#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace std;

using Real = long double;

struct Simpson {

using Real = long double;

function<Real(Real)> f;

Simpson(function<Real(Real)> g):f(g){}

//自适应辛普森积分，区间[a, b]，精度eps, 计算\int_{a}^{b}{f(x)dx}
Real solve(Real a, Real b, Real eps) const {
    return asr(a, b, eps, calc(a, b));
}
//自适应辛普森积分的递归调用
Real asr(Real a, Real b, Real eps, Real ans) const {
    Real mid = (a + b) * 0.5;
    Real lans = calc(a, mid);
    Real rans = calc(mid, b);
    //精度够直接返回
    if(fabs(lans + rans - ans) <= eps) return ans;
    //精度不够递归调用, epsilon有可能折半
    return asr(a, mid, eps, lans) + asr(mid, b, eps, rans);
}

Real calc(Real a, Real b) const {
    Real mid = (a + b) * 0.5;
    return (b - a) * (f(a) + f(b) + 4.0 * f(mid)) / 6.0;
}

};

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(0);   
    Real a;
    cin >> a;
    if(a < 0) cout << "orz\n";
    else cout << fixed << setprecision(5) << Simpson([&](Real x)->Real{return pow(x, a/x-x);}).solve(1E-8L, 30.L, 1E-10L) << endl; 
    return 0;
}